20. State Transformation Matrix
State Transformation Matrix
State Vector
A state vector is a column of values whose dimensions are 1 in width and M in height. This vector should contain all the values that we are interested in, and for predicting 1D movement, we are interested in the position, x, and the velocity, v.
Efficiently predicting state
With a state vector, we can predict a new state in just one matrix multiplication step.
Matrix multiplication
Matrix multiplication multiplies two grids of numbers; multiplying the rows in the first matrix, by the columns in the second. One step in this process is pictured, below.
Summing step
Once a whole row and column have been multiplied, matrix multiplication sums those values to form a single, new value in a resulting matrix.
Then it moves on to the next row, and this process repeats.
You can see that this creates a new 2x1 vector, with two values in it that may look familiar! These are just our equations for our constant velocity motion model. So, matrix multiplication let’s us create a new, predicted state vector in just one multiplication step!
In fact, this is such a common way to predict a new state, that the 2x2 matrix on the left is often called the state transformation matrix.